Counting CA3 synapses

We will count synapses and motifs in the CA3 network


In [1]:
from __future__ import division
from terminaltables import AsciiTable

In [2]:
import inet
inet.__version__


Out[2]:
'0.0.14'

In [3]:
from inet import DataLoader

Load CA3 matrices


In [4]:
mydataset = DataLoader('../data/CA3/') # 1102 experiments


1102 syn  files loaded

In [5]:
print(mydataset.motif) # number of connections tested and found for every type


+---------+-------+--------+
| Motif   | found | tested |
+---------+-------+--------+
| ee_c1e  | 0     | 15930  |
| ee_c2   | 6     | 7965   |
| ee_c2e  | 0     | 7965   |
| ee_chem | 146   | 15930  |
| ee_con  | 10    | 31614  |
| ee_div  | 23    | 31614  |
| ee_elec | 1     | 7965   |
| ee_lin  | 25    | 63228  |
+---------+-------+--------+


In [6]:
#number of interneurons and principal cells
print('{:4d} principal cells recorded'.format(mydataset.nPC))
print('{:4d} interneurons recorded'.format(mydataset.nIN)) #


4164 principal cells recorded
   0 interneurons recorded

In [7]:
mydataset.configuration # number of recording configurations


Out[7]:
{'octuples': 72,
 'pairs': 495,
 'quadruplets': 135,
 'quintuplets': 120,
 'septuplets': 66,
 'sextuplets': 118,
 'triplets': 96}

In [8]:
PEE = mydataset.motif.ee_chem_found/mydataset.motif.ee_chem_tested
print('Connection probability between CA3 cells = {:4.4f} %'.format(PEE))


Connection probability between CA3 cells = 0.0092 %

the element in the list with IN[0] contains zero interneurons (all the rest are principal neurons)


In [9]:
mydataset.IN[0] # this is the whole data set


Out[9]:
{'octuples': 72,
 'pairs': 495,
 'quadruplets': 135,
 'quintuplets': 120,
 'septuplets': 66,
 'sextuplets': 118,
 'triplets': 96}

Descriptive statistics

The stats attribute will return basis statistics of the whole dataset


In [10]:
y = mydataset.stats()

print AsciiTable(y).table


+-----------------+----------+
| Concept         | Quantity |
+-----------------+----------+
| Principal cells | 4164     |
| Interneurons    | 0        |
|                 |          |
| Pairs           | 495      |
| Triplets        | 96       |
| Quadruplets     | 135      |
| Quintuplets     | 120      |
| Sextuplets      | 118      |
| Septuplets      | 66       |
| Octuplets       | 72       |
+-----------------+----------+

In [11]:
mymotifs = mydataset.motif
info = [
        ['Connection type', 'Value'],
        ['CA3-CA3 chemical synapses', mymotifs.ee_chem_found],
        ['CA3-CA3 electrical synapses', mymotifs.ee_elec_found],
        [' ',' '],
        ['CA3-CA3 bidirectional motifs', mymotifs.ee_c2_found],
        ['CA3-CA3 divergent motifs', mymotifs.ee_div_found],
        ['CA3-CA3 convergetn motifs', mymotifs.ee_con_found],
        ['CA3-CA3 linear chains', mymotifs.ee_lin_found],
        [' ',' '],
        ['P(CA3-CA3) unidirectional motifs', mymotifs.ee_chem_found/mymotifs.ee_chem_tested],
        ['P(CA3-CA3) bidirectional motifs', mymotifs.ee_c2_found/mymotifs.ee_c2_tested],
        ['P(CA3-CA3) convergent motifs', mymotifs.ee_con_found/mymotifs.ee_con_tested],
        ['P(CA3-CA3) divergent motifs', mymotifs.ee_div_found/mymotifs.ee_div_tested],
        ['P(CA3-CA3) chain motifs', mymotifs.ee_lin_found/mymotifs.ee_lin_tested],

        ]


table = AsciiTable(info)
print (table.table)


+----------------------------------+-------------------+
| Connection type                  | Value             |
+----------------------------------+-------------------+
| CA3-CA3 chemical synapses        | 146               |
| CA3-CA3 electrical synapses      | 1                 |
|                                  |                   |
| CA3-CA3 bidirectional motifs     | 6                 |
| CA3-CA3 divergent motifs         | 23                |
| CA3-CA3 convergetn motifs        | 10                |
| CA3-CA3 linear chains            | 25                |
|                                  |                   |
| P(CA3-CA3) unidirectional motifs | 0.00916509730069  |
| P(CA3-CA3) bidirectional motifs  | 0.00075329566855  |
| P(CA3-CA3) convergent motifs     | 0.000316315556399 |
| P(CA3-CA3) divergent motifs      | 0.000727525779718 |
| P(CA3-CA3) chain motifs          | 0.000395394445499 |
+----------------------------------+-------------------+